import request from './request.js'

export const getAccount = () => {
  return request({
    url: 'account/all',
    method: 'get'
  })
}

export const addAccount = (data) => {
  return request({
    url: 'accounts',
    method: 'post',
    data
  })
}

export const editAccount = (data) => {
  return request({
    url: `accounts/${data.id}`,
    method: 'put',
    data
  })
}

export const deleteAccount = (id) => {
  return request({
    url: `accounts/${id}`,
    method: 'delete'
  })
}
